package org.finjic.entity;

import org.finjic.type.ScopeType;

import java.util.List;
import java.util.Map;

/**
 * User: Taras Date: 04.11.12 Time: 13:22
 */
public class BeanDefinition {
    String id;
    String type;
    List<ConstructorArg> constructorArgs;
    Map<String, Argument> properties;
    String factoryClass;
    String factoryMethod;
    String factoryBean;
    boolean lazy;
    ScopeType scope;

    public BeanDefinition(String id, String type) {
        this.id = id;
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<ConstructorArg> getConstructorArgs() {
        return constructorArgs;
    }

    public void setConstructorArgs(List<ConstructorArg> constructorArgs) {
        this.constructorArgs = constructorArgs;
    }

    public Map<String, Argument> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, Argument> properties) {
        this.properties = properties;
    }

    public String getFactoryClass() {
        return factoryClass;
    }

    public void setFactoryClass(String factoryClass) {
        this.factoryClass = factoryClass;
    }

    public String getFactoryMethod() {
        return factoryMethod;
    }

    public void setFactoryMethod(String factoryMethod) {
        this.factoryMethod = factoryMethod;
    }

    public String getFactoryBean() {
        return factoryBean;
    }

    public void setFactoryBean(String factoryBean) {
        this.factoryBean = factoryBean;
    }

    public boolean isLazy() {
        return lazy;
    }

    public void setLazy(boolean lazy) {
        this.lazy = lazy;
    }

    public ScopeType getScope() {
        return scope;
    }

    public void setScope(ScopeType scope) {
        this.scope = scope;
    }
    
    public void setProperty(String name, Argument arg){
        properties.put(name, arg);
    }
}
